package com.imooc.sellspringcloud.client;


import com.imooc.product.common.DecreaseStockInput;
import com.imooc.product.common.ProductInfoOutput;
import com.imooc.product.common.ResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author
 * @create 2019-07-29 23:20
 **/
@FeignClient(name = "PRODUCT-DEV")
public interface ProductClient {

    @PostMapping("/getPordutsByIds")
    List<ProductInfoOutput> getProductInfoByIds(List<String> ids);

    @PostMapping("/reduceProductStock")
    ResultVO reduceProductStock(List<DecreaseStockInput> decreaseStockInput);

    @GetMapping("/getAllProduct")
    List<ProductInfoOutput> getAllProductList();
}